define([
    'backbone',
    'indexController',
    'addController',
    'showController',
    'editController'
], function(B, IndexController,AddController,ShowController,EditController) {
    var Router=B.Router.extend({
        routes:{
            '':'index',
            'add':'add',
            'show/:id':'show',
            'edit/:id':'edit'
        },
        index:function(){
            IndexController.init();
        },
        add:function(){
            AddController.init();
        },
        show:function(id){
            ShowController.init(id);
        },
        edit:function(id){
            EditController.init(id);
        }
    })
    var router=new Router();
    return router;
});